/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ifrr.gepro.pessoa.bean;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import javax.persistence.Table;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author rafael
 */
@Entity
@Table(name = "funcaotec" ,catalog = "gepro", schema = "public")


public class FuncaoTecBean implements Serializable {
//    @OneToMany(mappedBy = "fkFuncao")
//    private Collection<TecnicoBean> tecnicoBeanCollection;
//    @OneToMany(mappedBy = "fkFuncao")
//    private Collection<TecnicoBean> tecnicoBeanCollection;
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_funcao", nullable = false, insertable = false)
    private Integer idFuncao;
    @Column(name = "descricao")
    private String descricao;

    public FuncaoTecBean() {
    }

    public FuncaoTecBean(Integer idFuncao) {
        this.idFuncao = idFuncao;
    }

    public Integer getIdFuncao() {
        return idFuncao;
    }

    public void setIdFuncao(Integer idFuncao) {
        this.idFuncao = idFuncao;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idFuncao != null ? idFuncao.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FuncaoTecBean)) {
            return false;
        }
        FuncaoTecBean other = (FuncaoTecBean) object;
        if ((this.idFuncao == null && other.idFuncao != null) || (this.idFuncao != null && !this.idFuncao.equals(other.idFuncao))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.ifrr.gepro.pessoa.bean.Funcaotec[ idFuncao=" + idFuncao + " ]";
    }
//
//    public Collection<TecnicoBean> getTecnicoBeanCollection() {
//        return tecnicoBeanCollection;
//    }
//
//    public void setTecnicoBeanCollection(Collection<TecnicoBean> tecnicoBeanCollection) {
//        this.tecnicoBeanCollection = tecnicoBeanCollection;
//    }
//    

//    @XmlTransient
//    public Collection<TecnicoBean> getTecnicoBeanCollection() {
//        return tecnicoBeanCollection;
//    }
//
//    public void setTecnicoBeanCollection(Collection<TecnicoBean> tecnicoBeanCollection) {
//        this.tecnicoBeanCollection = tecnicoBeanCollection;
//    }
}
